In this notebook, we are using the tmb_genomic.tsv file
generated from the 01-preprocess-data.Rmd script.
Error in `select()`:
! Can't subset columns that don't exist.
✖ Column `patient_id` doesn't exist.
Backtrace:
1. ... %>% ...
3. dplyr:::select.data.frame(...)
We will explore TMB per Kids_First_Participant_ID over
time by creating stacked barplots.
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/TMB-genomic-total.pdf\
png
2
Attention: Hypermutant TMB defined as ≥10 Mb, and Ultrahypermutant TMB defined as ≥100 mutations/Mb in pediatric brain tumors (https://pubmed.ncbi.nlm.nih.gov/29056344/).
Here, we notice that there are samples with high TMB (hyper-mutant samples). Next, we will exclude these samples (threshold >= 10) from downstream analysis. Attention is needed in cases with high number of mutations in only one timepoint as this will lead to un-matched longitudinal samples. We will also remove those so we always have matched longitudinal samples.
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/TMB-genomic-no-hypermutants.pdf\
png
2
We will explore TMB per cancer group over time by creating dumbbell plots. We classified by using cancer types with the highest number of samples (High- and Low-grade gliomas) versus any other cancer groups.
[1] \High-grade glioma\ \Low-grade glioma\ \Other cancer group\
[1] 1
[1] \High-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/High-grade glioma-TMB-dumbbell.pdf\
[1] 2
[1] \Low-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Low-grade glioma-TMB-dumbbell.pdf\
[1] 3
[1] \Other cancer group\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Other cancer group-TMB-dumbbell.pdf\
[1] 1
[1] \High-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/High-grade glioma-Mutations-dumbbell.pdf\
[1] 2
[1] \Low-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Low-grade glioma-Mutations-dumbbell.pdf\
[1] 3
[1] \Other cancer group\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Other cancer group-Mutations-dumbbell.pdf\
Let’s see if the issue with missing values per sample int he dumbbell plots is bypassed when using jitter plot.
[1] \High-grade glioma\ \Low-grade glioma\ \Other cancer group\
[1] 1
[1] \High-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/High-grade glioma-TMB-jitter.pdf\
[1] 2
[1] \Low-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Low-grade glioma-TMB-jitter.pdf\
[1] 3
[1] \Other cancer group\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Other cancer group-TMB-jitter.pdf\
It is not… i have tried with side-by-side barplots and it was the same issue. Dumbbell plots might be more informative to show changes across timepoints. We could consider to use them in later analyses.
Here, we want to explore the number of mutations per timepoint and biospecimen sample per patient case.
First, let’s try to use facet_wrap function. Again, we
are missing values in timepoints.
[1] 1
[1] \High-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/High-grade glioma-Mutations-barplot.pdf\
[1] 2
[1] \Low-grade glioma\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Low-grade glioma-Mutations-barplot.pdf\
[1] 3
[1] \Other cancer group\
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/Other cancer group-Mutations-barplot.pdf\
But this doesn’t happen when plotting separate barplots per
Kids_First_Participant_ID.
[1] \PT_02J5CWN5\ \PT_0DWRY9ZX\ \PT_1ZAWNGWT\ \PT_2FVTD0WR\ \PT_2MZPGZN1\
[6] \PT_2YT37G8P\ \PT_37B5JRP1\ \PT_39H4JN6H\ \PT_3GYW6P6P\ \PT_3P3HARZ2\
[11] \PT_3R0P995B\ \PT_3T3VGWC6\ \PT_3VCS1PPF\ \PT_5NS35B66\ \PT_5ZPPR06P\
[16] \PT_62G82T6Q\ \PT_82MX6J77\ \PT_89XRZBSG\ \PT_962TCBVR\ \PT_98QMQZY7\
[21] \PT_99S5BPE3\ \PT_B5DQ8FF0\ \PT_BRVGRXQY\ \PT_BZCJMEX8\ \PT_CWXSP19D\
[26] \PT_CXT81GRM\ \PT_DFQAH7RS\ \PT_DNAJYFZT\ \PT_DVXE38EX\ \PT_FN4GEEFR\
[31] \PT_HE8FBFNA\ \PT_HHG37M6W\ \PT_JNEV57VK\ \PT_JSFBMK5V\ \PT_KMHGNCNR\
[36] \PT_P571HTNK\ \PT_PF04R0BH\ \PT_PR4YBBH3\ \PT_QH9H491G\ \PT_S2SQJVGK\
[41] \PT_T4VN7ZRB\ \PT_TKWTTRQ7\ \PT_TP6GS00H\ \PT_TRZ1N1HQ\ \PT_VTG1S395\
[46] \PT_XA98HG1C\ \PT_XHYBZKCX\ \PT_YK7AD0KK\ \PT_Z4GS3ZQQ\ \PT_ZMKMKCFQ\
[1] 1
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_02J5CWN5-Mutations-barplot.pdf\
[1] 2
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_0DWRY9ZX-Mutations-barplot.pdf\
[1] 3
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_1ZAWNGWT-Mutations-barplot.pdf\
[1] 4
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_2FVTD0WR-Mutations-barplot.pdf\
[1] 5
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_2MZPGZN1-Mutations-barplot.pdf\
[1] 6
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_2YT37G8P-Mutations-barplot.pdf\
[1] 7
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_37B5JRP1-Mutations-barplot.pdf\
[1] 8
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_39H4JN6H-Mutations-barplot.pdf\
[1] 9
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_3GYW6P6P-Mutations-barplot.pdf\
[1] 10
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_3P3HARZ2-Mutations-barplot.pdf\
[1] 11
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_3R0P995B-Mutations-barplot.pdf\
[1] 12
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_3T3VGWC6-Mutations-barplot.pdf\
[1] 13
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_3VCS1PPF-Mutations-barplot.pdf\
[1] 14
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_5NS35B66-Mutations-barplot.pdf\
[1] 15
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_5ZPPR06P-Mutations-barplot.pdf\
[1] 16
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_62G82T6Q-Mutations-barplot.pdf\
[1] 17
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_82MX6J77-Mutations-barplot.pdf\
[1] 18
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_89XRZBSG-Mutations-barplot.pdf\
[1] 19
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_962TCBVR-Mutations-barplot.pdf\
[1] 20
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_98QMQZY7-Mutations-barplot.pdf\
[1] 21
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_99S5BPE3-Mutations-barplot.pdf\
[1] 22
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_B5DQ8FF0-Mutations-barplot.pdf\
[1] 23
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_BRVGRXQY-Mutations-barplot.pdf\
[1] 24
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_BZCJMEX8-Mutations-barplot.pdf\
[1] 25
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_CWXSP19D-Mutations-barplot.pdf\
[1] 26
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_CXT81GRM-Mutations-barplot.pdf\
[1] 27
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_DFQAH7RS-Mutations-barplot.pdf\
[1] 28
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_DNAJYFZT-Mutations-barplot.pdf\
[1] 29
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_DVXE38EX-Mutations-barplot.pdf\
[1] 30
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_FN4GEEFR-Mutations-barplot.pdf\
[1] 31
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_HE8FBFNA-Mutations-barplot.pdf\
[1] 32
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_HHG37M6W-Mutations-barplot.pdf\
[1] 33
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_JNEV57VK-Mutations-barplot.pdf\
[1] 34
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_JSFBMK5V-Mutations-barplot.pdf\
[1] 35
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_KMHGNCNR-Mutations-barplot.pdf\
[1] 36
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_P571HTNK-Mutations-barplot.pdf\
[1] 37
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_PF04R0BH-Mutations-barplot.pdf\
[1] 38
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_PR4YBBH3-Mutations-barplot.pdf\
[1] 39
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_QH9H491G-Mutations-barplot.pdf\
[1] 40
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_S2SQJVGK-Mutations-barplot.pdf\
[1] 41
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_T4VN7ZRB-Mutations-barplot.pdf\
[1] 42
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_TKWTTRQ7-Mutations-barplot.pdf\
[1] 43
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_TP6GS00H-Mutations-barplot.pdf\
[1] 44
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_TRZ1N1HQ-Mutations-barplot.pdf\
[1] 45
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_VTG1S395-Mutations-barplot.pdf\
[1] 46
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_XA98HG1C-Mutations-barplot.pdf\
[1] 47
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_XHYBZKCX-Mutations-barplot.pdf\
[1] 48
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_YK7AD0KK-Mutations-barplot.pdf\
[1] 49
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_Z4GS3ZQQ-Mutations-barplot.pdf\
[1] 50
[1] \/home/rstudio/pbta-tumor-evolution/analyses/tmb-vaf-longitudinal/plots/PT_ZMKMKCFQ-Mutations-barplot.pdf\
sessionInfo()
R version 4.2.3 (2023-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] ggthemes_4.2.4 lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0
[5] dplyr_1.1.1 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0
[9] tibble_3.2.1 ggplot2_3.4.0 tidyverse_2.0.0
loaded via a namespace (and not attached):
[1] highr_0.10 bslib_0.4.2 compiler_4.2.3 pillar_1.9.0
[5] jquerylib_0.1.4 tools_4.2.3 bit_4.0.5 digest_0.6.31
[9] timechange_0.2.0 jsonlite_1.8.4 evaluate_0.20 lifecycle_1.0.3
[13] gtable_0.3.3 pkgconfig_2.0.3 rlang_1.1.0 cli_3.6.1
[17] parallel_4.2.3 yaml_2.3.7 xfun_0.38 fastmap_1.1.1
[21] withr_2.5.0 knitr_1.42 generics_0.1.3 vctrs_0.6.2
[25] sass_0.4.5 hms_1.1.3 bit64_4.0.5 rprojroot_2.0.3
[29] tidyselect_1.2.0 glue_1.6.2 R6_2.5.1 fansi_1.0.4
[33] vroom_1.6.1 rmarkdown_2.21 farver_2.1.1 tzdb_0.3.0
[37] magrittr_2.0.3 scales_1.2.1 htmltools_0.5.5 colorspace_2.1-0
[41] labeling_0.4.2 utf8_1.2.3 stringi_1.7.12 munsell_0.5.0
[45] cachem_1.0.7 crayon_1.5.2